<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="bolao" />
  <g:set var="entityName" value="${message(code: 'cup.label', default: 'Cup')}" />
  <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
  <div class="body">
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
      <fieldset>
        <legend><g:message code="default.show.label" args="[entityName]" /></legend>
          <table>
            <tbody>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.year.label" default="Year" />:</td>
                <td valign="top" class="value">${cup.year.encodeAsHTML()}</td>
              </tr>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.venue.label" default="Venue" />:</td>
                <td valign="top" class="value">${cup.venue.encodeAsHTML()}</td>
              </tr>
              <g:ifAnyGranted role="ROLE_ADMIN">
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.dateCreated.label" default="Date Created" />:</td>
                <td valign="top" class="value"><g:formatDate date="${cup?.dateCreated}" formatName="datetime.format"/></td>
              </tr>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.lastUpdated.label" default="Last Updated" />:</td>
                <td valign="top" class="value"><g:formatDate date="${cup?.lastUpdated}" formatName="datetime.format"/></td>
              </tr>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.createdBy.label" default="Created By" />:</td>
                <td valign="top" class="value"><g:link controller="user" action="show" id="${cup?.createdBy?.id}">${cup?.createdBy?.username?.encodeAsHTML()}</g:link></td>
              </tr>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.updatedBy.label" default="Updated By" />:</td>
                <td valign="top" class="value"><g:link controller="user" action="show" id="${cup?.updatedBy?.id}">${cup?.updatedBy?.username?.encodeAsHTML()}</g:link></td>
              </tr>
              </g:ifAnyGranted>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.active.label" default="Active" />:</td>
                <td valign="top" class="value"><g:formatBoolean boolean="${cup?.active}" /></td>
              </tr>
              <tr class="prop">
                <td valign="top" class="name"><g:message code="cup.groups.label" default="Groups" />:</td>
                <td valign="top" style="text-align: left;" class="value">
                  <g:each in="${cup.groups}" var="g">
                    <g:link controller="group" action="show" id="${g.id}">${g?.name.encodeAsHTML()}</g:link>
                  </g:each>
                </td>
              </tr>
           </tbody>
          </table>
      </fieldset>
    </div>
    <div class="buttons">
      <g:form>
        <g:hiddenField name="id" value="${cup?.id}" />
        <g:ifAnyGranted role="ROLE_ADMIN">
        <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
        <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
        </g:ifAnyGranted>
      </g:form>
    </div>
  </div>
</body>
</html>
